local sk__zhixi = fk.CreateSkill {

  name = "sk__zhixi",

  tags = {},

}



sk__zhixi:addEffect("active", {
  name = "sk__zhixi",
  anim_type = "offensive",
  card_num = 1,
  target_num = 1,
  prompt = "#sk__zhixi",
  expand_pile = "sk__caojie_xi",
  can_use = function(self, player)
    return #player:getPile("sk__caojie_xi") > 0
  end,
  target_filter = function(self, player, to_select, selected, selected_cards)
    return #selected == 0 and to_select ~= player
  end,
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and player:getPileNameOfId(to_select) == "sk__caojie_xi"
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local mark = player:getTableMark(sk__zhixi.name)
    local n = 1
    if table.insertIfNeed(mark, target.id) then
      n = 3
      room:setPlayerMark(player, sk__zhixi.name, mark)
    end
    room:moveCardTo(effect.cards, Card.PlayerHand, target, fk.ReasonGive, sk__zhixi.name, nil, true, player)
    if not target.dead then
      room:loseHp(target, n, sk__zhixi.name)
    end
  end,
})

return sk__zhixi
